/*    
    OpenMheg - A free MHEG-5 library
    Copyright (C) 2008 Dharmesh Malam

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Model.Data
{
    public class FontAttributes
    {
        private float fontSize;

        public float FontSize
        {
            get { return fontSize; }
            set { fontSize = value; }
        }

        private int lineSpacing;

        public int LineSpacing
        {
            get { return lineSpacing; }
            set
            {
                lineSpacing =   value < 0 ? 0 : value > 255 ? 255 : value;
            }
        }
        
        private System.Drawing.FontStyle fontStyle;

        public System.Drawing.FontStyle FontStyle
        {
            get { return fontStyle; }
            set { fontStyle = value; }
        }

        private int letterSpace;

        public int LetterSpace
        {
            get { return letterSpace; }
            set
            {
                letterSpace = value < -32767 ? -32767 : value > 32767 ? 32767 : value;
            }
        }

        public FontAttributes () { }

        public FontAttributes ( int fontSize, int lineSpacing, System.Drawing.FontStyle fontStyle, int letterSpace )
        {
            this.fontSize = fontSize;
            this.LineSpacing = lineSpacing;
            this.fontStyle = fontStyle;
            this.LetterSpace = letterSpace;
        }
    }
}
